Skip to content

gpui_web: Support browser paste actions - #62575

Open
Veykril wants to merge 1 commit into
mainfrom
veykril/gpui-web-browser-paste
Open

gpui_web: Support browser paste actions#62575
Veykril wants to merge 1 commit into
mainfrom
veykril/gpui-web-browser-paste

Conversation

@Veykril

@Veykril Veykril commented Aug 13, 2026

Copy link
Copy Markdown
Member

GPUI's web backend previously dispatched paste shortcuts through the normal keybinding path before the browser's paste event fired. Because the browser clipboard API is asynchronous, Platform::read_from_clipboard returned None; handling the keydown also prevented the browser from delivering the clipboard data through ClipboardEvent.

This change defers recognized browser paste shortcuts until the DOM paste event arrives. It temporarily exposes the event's plain-text clipboard item through Platform::read_from_clipboard, replays the original keystroke through GPUI's normal input dispatch, and clears the item afterward. Paste initiated from browser menus uses the platform's standard paste keystroke, while alternate bindings such as Ctrl-Shift-V and Shift-Insert retain their original action dispatch.

Release Notes:

  • Fixed pasting text into GPUI applications running in a web browser.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 13, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant